{% extends "base.html" %}

{% block title %}联系我们 - 万岛潜水{% endblock %}

{% block content %}
<div class="container">
    <h1 class="text-center mb-5">联系我们</h1>
    
    <div class="row mb-5">
        <div class="col-md-6 mb-4 mb-md-0">
            <div class="card shadow-sm h-100">
                <div class="card-body">
                    <h2 class="card-title h4 mb-4">联系方式</h2>
                    <div class="d-flex mb-3">
                        <div class="flex-shrink-0">
                            <i class="fas fa-map-marker-alt fa-2x text-primary"></i>
                        </div>
                        <div class="flex-grow-1 ms-3">
                            <h5>地址</h5>
                            <p class="mb-0">广东省珠海市万山区外伶仃岛</p>
                        </div>
                    </div>
                    <div class="d-flex mb-3">
                        <div class="flex-shrink-0">
                            <i class="fas fa-phone fa-2x text-primary"></i>
                        </div>
                        <div class="flex-grow-1 ms-3">
                            <h5>电话</h5>
                            <p class="mb-0">123-456-7890</p>
                        </div>
                    </div>
                    <div class="d-flex mb-3">
                        <div class="flex-shrink-0">
                            <i class="fas fa-envelope fa-2x text-primary"></i>
                        </div>
                        <div class="flex-grow-1 ms-3">
                            <h5>邮箱</h5>
                            <p class="mb-0">info@wandaodiving.com</p>
                        </div>
                    </div>
                    <div class="d-flex">
                        <div class="flex-shrink-0">
                            <i class="fab fa-weixin fa-2x text-primary"></i>
                        </div>
                        <div class="flex-grow-1 ms-3">
                            <h5>微信</h5>
                            <p class="mb-0">wandaodiving</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-6">
            <div class="card shadow-sm h-100">
                <div class="card-body">
                    <h2 class="card-title h4 mb-4">营业时间</h2>
                    <div class="d-flex mb-3">
                        <div class="flex-shrink-0">
                            <i class="fas fa-clock fa-2x text-primary"></i>
                        </div>
                        <div class="flex-grow-1 ms-3">
                            <h5>每日营业时间</h5>
                            <p class="mb-0">上午8:00至下午6:00</p>
                        </div>
                    </div>
                    <div class="d-flex mb-3">
                        <div class="flex-shrink-0">
                            <i class="fas fa-calendar-alt fa-2x text-primary"></i>
                        </div>
                        <div class="flex-grow-1 ms-3">
                            <h5>营业日</h5>
                            <p class="mb-0">全年无休（恶劣天气除外）</p>
                        </div>
                    </div>
                    <div class="d-flex">
                        <div class="flex-shrink-0">
                            <i class="fas fa-info-circle fa-2x text-primary"></i>
                        </div>
                        <div class="flex-grow-1 ms-3">
                            <h5>特别说明</h5>
                            <p class="mb-0">如遇台风、暴雨等恶劣天气，可能会临时调整营业时间，请提前咨询。</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <div class="row mb-5">
        <div class="col-12">
            <div class="card shadow-sm">
                <div class="card-body">
                    <h2 class="card-title h4 mb-4">在线留言</h2>
                    
                    {% with messages = get_flashed_messages() %}
                    {% if messages %}
                    <div class="alert alert-success">
                        {% for message in messages %}
                        {{ message }}
                        {% endfor %}
                    </div>
                    {% endif %}
                    {% endwith %}
                    
                    <form method="post" action="{{ url_for('main.contact') }}">
                        {{ form.hidden_tag() }}
                        <div class="row">
                            <div class="col-md-6 mb-3">
                                {{ form.name.label(class="form-label") }}
                                {{ form.name(class="form-control", placeholder="请输入您的姓名") }}
                                {% for error in form.name.errors %}
                                <div class="text-danger">{{ error }}</div>
                                {% endfor %}
                            </div>
                            <div class="col-md-6 mb-3">
                                {{ form.email.label(class="form-label") }}
                                {{ form.email(class="form-control", placeholder="请输入您的邮箱") }}
                                {% for error in form.email.errors %}
                                <div class="text-danger">{{ error }}</div>
                                {% endfor %}
                            </div>
                        </div>
                        <div class="mb-3">
                            {{ form.phone.label(class="form-label") }}
                            {{ form.phone(class="form-control", placeholder="请输入您的手机号") }}
                            {% for error in form.phone.errors %}
                            <div class="text-danger">{{ error }}</div>
                            {% endfor %}
                        </div>
                        <div class="mb-3">
                            {{ form.message.label(class="form-label") }}
                            {{ form.message(class="form-control", rows="5", placeholder="请输入您的留言内容") }}
                            {% for error in form.message.errors %}
                            <div class="text-danger">{{ error }}</div>
                            {% endfor %}
                        </div>
                        <div class="d-grid gap-2">
                            {{ form.submit(class="btn btn-primary") }}
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    
    <div class="row">
        <div class="col-12">
            <div class="card shadow-sm">
                <div class="card-body">
                    <h2 class="card-title h4 mb-4">如何到达</h2>
                    <div class="row">
                        <div class="col-md-6">
                            <h5>从珠海市区出发</h5>
                            <ol>
                                <li>前往珠海九洲港客运码头</li>
                                <li>购买前往外伶仃岛的船票（每日有多班船次）</li>
                                <li>乘船约1.5小时到达外伶仃岛码头</li>
                                <li>岛上有接驳车或可步行前往万岛潜水中心（约15分钟）</li>
                            </ol>
                            <h5 class="mt-4">船班信息</h5>
                            <p>珠海九洲港至外伶仃岛：上午8:30、10:30，下午2:30</p>
                            <p>外伶仃岛至珠海九洲港：上午9:00、11:00，下午3:00</p>
                            <p class="text-muted">注：船班信息可能会有变动，请提前咨询确认。</p>
                        </div>
                        <div class="col-md-6">
                            <img src="{{ url_for('static', filename='img/map.jpg') }}" class="img-fluid rounded" alt="地图">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 